public class Tapered implements SolidGraphics {
	private float r;
	private float h;

	public Tapered(float r, float h) {
		super();
		this.r = r;
		this.h = h;
	}

	public float caculateArea() {
		float area = (float) (0.5f * Math.sqrt(Math.pow(r, 2) + Math.pow(h, 2)) * 2 * Contants.PI * r
				+ Contants.PI * Math.pow(r, 2));
		return area;
	}

	public float caculateVolume() {
		float volume = (float) ((1f / 3f) * Contants.PI * Math.pow(r, 2) * h);
		return volume;
	}

	public float getR() {
		return r;
	}

	public void setR(float r) {
		this.r = r;
	}

	public float getH() {
		return h;
	}

	public void setH(float h) {
		this.h = h;
	}
}
